-
Notifications
You must be signed in to change notification settings - Fork 272
fix(amazonq): move workspace lsp messages off blocking thread calls #5816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
we are inappropriately freezing EDT while passing workspace context to the LSP
Qodana Community for JVM3 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
...ains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspService.kt
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
holder.languageServer | ||
} | ||
} catch (_: Exception) { | ||
LOG.debug { "LSP not running" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should this be an info with exception message?
chatManager.getAllTabIds().forEach { tabId -> | ||
AmazonQLspService.executeIfRunning(project) { server -> | ||
rawEndpoint.notify(CHAT_TAB_REMOVE, mapOf("tabId" to tabId)) | ||
currentThreadCoroutineScope().launch { |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
} | ||
AmazonQLspService.didChangeConfiguration(project) | ||
|
||
currentThreadCoroutineScope().launch { |
Check warning
Code scanning / QDJVMC
Unstable API Usage Warning
} | ||
} | ||
|
||
fun<T> syncExecuteIfRunning(runnable: suspend AmazonQLspService.(AmazonQLanguageServer) -> T): T? = |
Check warning
Code scanning / QDJVMC
Unused symbol Warning
we are inappropriately freezing EDT while passing workspace context to the LSP
#5811
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.